package com.example.algorithm.Singleton;

/**
 * 静态对象,在初始的时候就会创建了 全局唯一
 * 饿汉模式
 * Created by ZMJ on 2020/1/10.
 */
public class StaticSingleton {

    private static final StaticSingleton staticSingleton = new StaticSingleton();

    private StaticSingleton() {}

    public StaticSingleton getInstance() {
        return staticSingleton;
    }

}
